/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Acer
 */
@Entity
@Table(name = "tb_Admin", catalog = "East2West_TourAndTravel", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "TbAdmin.findAll", query = "SELECT t FROM TbAdmin t"),
    @NamedQuery(name = "TbAdmin.findByAID", query = "SELECT t FROM TbAdmin t WHERE t.aID = :aID"),
    @NamedQuery(name = "TbAdmin.findByAUserName", query = "SELECT t FROM TbAdmin t WHERE t.aUserName = :aUserName"),
    @NamedQuery(name = "TbAdmin.findByAPassword", query = "SELECT t FROM TbAdmin t WHERE t.aPassword = :aPassword"),
    @NamedQuery(name = "TbAdmin.findByAName", query = "SELECT t FROM TbAdmin t WHERE t.aName = :aName"),
    @NamedQuery(name = "TbAdmin.findByAEmail", query = "SELECT t FROM TbAdmin t WHERE t.aEmail = :aEmail"),
    @NamedQuery(name = "TbAdmin.findByAPhone", query = "SELECT t FROM TbAdmin t WHERE t.aPhone = :aPhone"),
    @NamedQuery(name = "TbAdmin.findByAAddress", query = "SELECT t FROM TbAdmin t WHERE t.aAddress = :aAddress"),
    @NamedQuery(name = "TbAdmin.findByAType", query = "SELECT t FROM TbAdmin t WHERE t.aType = :aType")})
public class TbAdmin implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "a_ID", nullable = false)
    private Integer aID;
    @Column(name = "a_UserName", length = 50)
    private String aUserName;
    @Column(name = "a_Password", length = 50)
    private String aPassword;
    @Column(name = "a_Name", length = 50)
    private String aName;
    @Column(name = "a_Email", length = 50)
    private String aEmail;
    @Column(name = "a_Phone", length = 11)
    private String aPhone;
    @Column(name = "a_Address", length = 250)
    private String aAddress;
    @Column(name = "a_Type", length = 50)
    private String aType;

    public TbAdmin() {
    }

    public TbAdmin(Integer aID) {
        this.aID = aID;
    }

    public Integer getAID() {
        return aID;
    }

    public void setAID(Integer aID) {
        this.aID = aID;
    }

    public String getAUserName() {
        return aUserName;
    }

    public void setAUserName(String aUserName) {
        this.aUserName = aUserName;
    }

    public String getAPassword() {
        return aPassword;
    }

    public void setAPassword(String aPassword) {
        this.aPassword = aPassword;
    }

    public String getAName() {
        return aName;
    }

    public void setAName(String aName) {
        this.aName = aName;
    }

    public String getAEmail() {
        return aEmail;
    }

    public void setAEmail(String aEmail) {
        this.aEmail = aEmail;
    }

    public String getAPhone() {
        return aPhone;
    }

    public void setAPhone(String aPhone) {
        this.aPhone = aPhone;
    }

    public String getAAddress() {
        return aAddress;
    }

    public void setAAddress(String aAddress) {
        this.aAddress = aAddress;
    }

    public String getAType() {
        return aType;
    }

    public void setAType(String aType) {
        this.aType = aType;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (aID != null ? aID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbAdmin)) {
            return false;
        }
        TbAdmin other = (TbAdmin) object;
        if ((this.aID == null && other.aID != null) || (this.aID != null && !this.aID.equals(other.aID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.TbAdmin[aID=" + aID + "]";
    }

}
